package com.ilink.groundservice.service.study;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.IService;
import com.ilink.groundservice.entity.PO.study.course.StudyTeacherCoursesFavorite;
import com.ilink.groundservice.entity.VO.study.CourseResponse;
import com.ilink.groundservice.entity.VO.study.NoteCollectionResponse;
import com.ilink.groundservice.entity.VO.study.NoteResponse;
import com.ilink.ilinkapi.dto.ground.study.CourseMetadataRequest;
import com.ilink.ilinkcommon.domain.PO.studyservice.StudyTeacherCourse;
import java.util.List;
import java.util.Map;
import org.springframework.transaction.annotation.Transactional;

/**
 * <h3>iLink-java-backend-zhangbo2</h3>
 *
 * @Description <p>学习广场-课程-学生端的服务接口</p>
 * @Author ZhangBo
 * @Date 2024-09-18 09:31
 **/
public interface StudyCourseStudentService   extends IService<StudyTeacherCourse> {
    IPage<CourseResponse> getCourseMetadata(String userId, CourseMetadataRequest request);
    CourseResponse getCourseInformationById(Long courseId);
    Map<String, String> getSourceName(Long sourceId);
    String getSourceUrl(Long sourceId);
    String getSourceUrlByObjectName(String objectName);
    @Transactional
    boolean addView(Long courseId);
    @Transactional
    String addFavoriteCourse(String userId, String courseId);
    @Transactional
    String removeFavoriteCourse(String userId, String courseId);
    List<StudyTeacherCoursesFavorite> getFavoriteListByUserId(String userId);
    List<String> getCommonTags(int num);
    List<NoteCollectionResponse> getAllNotesByTeacher(String courseId);
}
